package com.tfswx.ruleengine.database.enums;

/**
 * @author ricky
 * @date 2022/3/1
 */
public enum SjklxEnum {
    DM("dm"), MYSQL("mysql"), SQLITE("sqlite");

    private final String databaseId;

    SjklxEnum(String databaseId) {
        this.databaseId = databaseId;
    }

    public static SjklxEnum getSjklxEnum(String databaseId) {
        for (SjklxEnum value : values()) {
            if (databaseId.equals(value.databaseId)) {
                return value;
            }
        }
        throw new RuntimeException("暂不支持：" + databaseId);
    }
}
